import request from '@/utils/request'

interface fileObj {
  fileUuid: string
  uploadTime: number
  userId: number
  versionCode: number
  versionName?: null
  apkIconTempUrl?: null
  apkName?: null
  packageName?: null
  fileMd5?: string
  isContainPayPermission?: null
  usesPermissions?: null
  payPermission?: null
}

export const uploadFile = (data: FormData): Promise<fileObj> => {
  return request({
    url: '/file-server/file/upload',
    method: 'POST',
    data,
    timeout: 30 * 60 * 1000
  })
}
